<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    x:Class="OpenLS.Spreadsheet.UI.WorksheetSplitterResources"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:ssui="clr-namespace:OpenLS.Spreadsheet.UI"
    >
  <SolidColorBrush x:Key="lightBrush" Color ="#FFFCFFFF"/>
  <SolidColorBrush x:Key="mediumBrush" Color ="#FFD5E8F9"/>
  <SolidColorBrush x:Key="darkBrush" Color ="#FF778796"/>
  <Style TargetType="{x:Type ssui:WorksheetSplitter}" >
    <Setter Property="PreviewStyle">
      <Setter.Value>
        <Style TargetType="IFrameworkInputElement">
          <Style.Resources>
            <ResourceDictionary />
          </Style.Resources>
          <Setter Property="Control.Template">
            <Setter.Value>
              <ControlTemplate>
                <Rectangle Fill="#80000000" />
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>

    
    <Style.Triggers>
      <DataTrigger Binding="{Binding View.Pane.State}" Value="Frozen">
        <Setter Property="IsEnabled" Value="False"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding View.Pane.State}" Value="FrozenSplit">
        <Setter Property="IsEnabled" Value="False"/>
      </DataTrigger>
      <Trigger Property="ResizeDirection" Value="Columns">
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property ="Template">
          <Setter.Value>
            <ControlTemplate TargetType ="{x:Type ssui:WorksheetSplitter}">
              <DockPanel>
                <Rectangle Fill="{StaticResource lightBrush}" Width="1" DockPanel.Dock="Left"/>
                <Rectangle Fill="{StaticResource darkBrush}" Width="1" DockPanel.Dock="Right"/>
                <Rectangle Fill="{StaticResource mediumBrush}" />
              </DockPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="ResizeDirection" Value="Rows">
        <Setter Property="Cursor" Value="SizeNS"/>
        <Setter Property ="Template">
          <Setter.Value>
            <ControlTemplate TargetType ="{x:Type ssui:WorksheetSplitter}">
              <DockPanel>
                <Rectangle Fill="{StaticResource lightBrush}" Height="1" DockPanel.Dock="Top"/>
                <Rectangle Fill="{StaticResource darkBrush}" Height="1" DockPanel.Dock="Bottom"/>
                <Rectangle Fill="{StaticResource mediumBrush}" />
              </DockPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="ResizeDirection" Value="Both">
        <Setter Property="Cursor" Value="SizeAll"/>
        <Setter Property ="Template">
          <Setter.Value>
            <ControlTemplate TargetType ="{x:Type ssui:WorksheetSplitter}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="1"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="1"/>
                  <RowDefinition Height ="*"/>
                  <RowDefinition Height="1"/>
                </Grid.RowDefinitions>
                <Rectangle Fill="{StaticResource mediumBrush}" Grid.RowSpan ="3" Grid.ColumnSpan ="3"/>
                <Rectangle Fill ="{StaticResource lightBrush}"/>
                <Rectangle Fill ="{StaticResource lightBrush}" Grid.Column="2"/>
                <Rectangle Fill ="{StaticResource darkBrush}" Grid.Row="2"/>
                <Rectangle Fill ="{StaticResource darkBrush}" Grid.Row="2" Grid.Column="2"/>
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Background" Value="Black"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="False"/>
          <Condition Property ="ResizeDirection" Value="Columns"/>
        </MultiTrigger.Conditions>
        <Setter Property="Width" Value="1"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="True"/>
          <Condition Property ="ResizeDirection" Value="Columns"/>
        </MultiTrigger.Conditions>
        <Setter Property="Width" Value="9"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="False"/>
          <Condition Property ="ResizeDirection" Value="Rows"/>
        </MultiTrigger.Conditions>
        <Setter Property="Height" Value="1"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="True"/>
          <Condition Property ="ResizeDirection" Value="Rows"/>
        </MultiTrigger.Conditions>
        <Setter Property="Height" Value="9"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="False"/>
          <Condition Property ="ResizeDirection" Value="Both"/>
        </MultiTrigger.Conditions>
        <Setter Property="Height" Value="1"/>
        <Setter Property="Width" Value="1"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property ="IsEnabled" Value="True"/>
          <Condition Property ="ResizeDirection" Value="Both"/>
        </MultiTrigger.Conditions>
        <Setter Property="Height" Value="9"/>
        <Setter Property="Width" Value="9"/>
      </MultiTrigger>
      <Trigger Property ="IsEnabled" Value ="False">
        <Setter Property ="Template">
          <Setter.Value>
            <ControlTemplate TargetType ="{x:Type Thumb}">
              <Rectangle Fill="{TemplateBinding Background}"/>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>


</ResourceDictionary>